/*
 * service_time.h
 *
 *  Created on: 02/03/2010
 *      Author: Gustavo
 */

#ifndef service_time_H_
#define service_time_H_


// ************************* INCLUDES **************************

#include "target.h"
#include "kernel_FreeRTOS.h"

// *********************** DEFINITIONS *************************

typedef portTickType service_time_TimeTicks;
typedef xTimeOutType service_time_Timeout;

// *********************** PROTOTYPES **************************

// *************************** BODY ****************************

#define service_time_init()

#define service_time_getCurrentTimeTicks() \
	((service_time_TimeTicks)xTaskGetTickCount())

#define service_time_delay(ticks) \
	vTaskDelay((portTickType)ticks)

#define service_time_relativeDelay(relativeTime, ticks) \
	vTaskDelayUntil(relativeTime, ticks)

#define service_time_setTimeoutState(timeout)\
	vTaskSetTimeOutState(timeout)

#define service_time_checkTimeout(x_timeout, limitTimeout)\
	xTaskCheckForTimeOut(x_timeout, limitTimeout)

#endif /* service_time_H_ */
